export default {
    name: 'Picturepreview',
    components: {

    },
    data() {
        return {
            currentTab: '/preview',
            showPage: '/preview',
            tabList: [
                {
                    action: '/preview',
                    name: '预览模式'
                },
                {
                    action: '/picturelist',
                    name: '报表模式'
                }
            ]
        }
    },
    computed: {

    },
    watch: {
        currentTab(newVal, oldVal) {
            this.$router.push({
                path: newVal
            });
        },
        $route: {
            handler(val, oldVal) {
                if (val.path == '/picturepreview') {
                    this.routeAgain();
                }
            }
        }
    },
    created() {
        this.routeAgain();
        this.$router.push({
            path: this.showPage,
        });
    },
    mounted() {

    },
    methods: {
        routeAgain() {
            this.$router.push({
                path: '/preview'
            })
        }
    },
}